<!DOCTYPE html>
<html>
<head>
	<!-- 公共页面 -->
	#include("../include/common.html")
	<!-- 公共页面 /-->
</head>
<body class="hold-transition skin-purple sidebar-mini">
    <div class="wrapper">
        <!-- 页面头部 -->
        #include("../include/header.html")
        <!-- 页面头部 /-->
        <!-- 导航侧栏 -->
        #include("../include/menu.html")
        <!-- 导航侧栏 /-->
        <!-- 内容区域 -->
        <div class="content-wrapper" id="contentDiv">
            <!-- 正文区域 -->
            <section class="content">
            	<form id="inputForm" action="save" method="post">
				<!--表单信息-->
                <div class="panel panel-default" style="padding-bottom: 10px;">
                    <div class="panel-heading">菜单信息</div>
                    <div class="row data-type">
                        <div class="col-md-2 title">名称</div>
                        <div class="col-md-10 data">
                            <input type="text" class="form-control" placeholder="名称" name="name" value="">
                        </div>
                        <div class="col-md-2 title">上级菜单</div>
                        <div class="col-md-10 data">
                            <select class="form-control" name="parentId">
		                       <option value="">顶级菜单</option>
								#for(menuItem : menuTree)
								<option value="#(menuItem.id)">
								#if(menuItem.grade != 0)
								     #for(i = 0; i < menuItem.grade; i++)
										&nbsp;&nbsp;
									#end
								#end
								#(menuItem.name)
								</option>
								#end
		                    </select>
                        </div>
                        <div class="col-md-2 title">是否显示</div>
                        <div class="col-md-10 data">
                            <div class="form-group form-inline">
                                <div class="radio"><label><input type="radio" name="isShow" value="true" checked="checked"> 是</label></div>
                                <div class="radio"><label><input type="radio" name="isShow" value="false"> 否</label></div>
                            </div>
                        </div>
                        <div class="col-md-2 title">类型</div>
                        <div class="col-md-10 data">
                            <div class="form-group form-inline">
                                <div class="radio"><label><input type="radio" name="type" value="1"> 菜单</label></div>
                                <div class="radio"><label><input type="radio" name="type" value="2"> 页面</label></div>
                            </div>
                        </div>
                        <div class="col-md-2 title">图标</div>
                        <div class="col-md-10 data">
                            <input type="text" class="form-control" placeholder="图标" name="icon" value="">
                        </div>
                        <div class="col-md-2 title">地址</div>
                        <div class="col-md-10 data">
                            <input type="text" class="form-control" placeholder="地址" name="url" value="">
                        </div>
                    </div>
	                <!--工具栏-->
	                <div class="box-tools text-center">
	                    <button type="submit" class="btn bg-maroon">保存</button>
	                    <button type="button" class="btn bg-default" onclick="history.back(-1);">返回</button>
	                </div>
	                <!--工具栏/-->
                </div>
                <!--表单信息/-->
                </form>
            </section>
            <!-- 正文区域 /-->
        </div>
        <!-- 内容区域 /-->
        <!-- 底部导航 -->
        #include("../include/footer.html")
        <!-- 底部导航 /-->
    </div>
</body>
</html>
<!---->
<script>
 $(document).ready(function() {
     // 激活导航位置
     setSidebarActive("admin-admin");
 });
</script>
<script type="text/javascript">

$().ready(function() {

	var $inputForm = $("#inputForm");
	
	
	// 表单验证
	$inputForm.validate({
		rules: {
			name: "required",
			parentId: "required",
			type: "required",
			url: "required"
		}
	});

});
</script>
